package com.ikun.mapper;

import com.ikun.pojo.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    //根据商家id与用户id查询购物车
    public List<ShoppingCart> getShoppingCartIdByBusinessIdAndUserId(Integer businessId, Integer userId);
    //根据userId,businessId,DishesId添加购物车
    public int addShoppingCart(Integer userId, Integer businessId,Integer quantity, Integer dishesId);
    //根据userId,businessId,DishesId修改购物车中quantity的数量
    public int updateQuantityByUserIdAndBusinessIdAndDishesId(Integer userId, Integer businessId, Integer dishesId, Integer quantity);
    //根据userId,businessId,DishesId删除购物车中该项
    public int deleteShoppingCartByUserIdAndBusinessIdAndDishesId(Integer userId, Integer businessId, Integer dishesId);

}
